#ifndef NEOROLLER_H
#define NEOROLLER_H

#include "stdafx.h"
#include <QWidget>

class NeoRollerPrivate;
class NeoRoller : public QWidget
{
    Q_OBJECT
    NEO_PUBLIC_CREATE(NeoRoller)
    NEO_PUBLIC_PROPERTY_CREATE_NOTIFY_H(QString, CurrentItem)
    NEO_PUBLIC_PROPERTY_CREATE_H(int, MaxVisibleItems)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, BackgroundColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, SelectorColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, TextColor)
    NEO_PUBLIC_PROPERTY_CREATE_H(QColor, SelectorTextColor)
public:
    NeoRoller(QWidget *parent = nullptr);
    ~NeoRoller();

    void setItems(const QStringList &items);
    QStringList getItems() const noexcept;

protected:
    void paintEvent(QPaintEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void wheelEvent(QWheelEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;
};

#endif